package com.chen.springboot.mapper;
//接口方法
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chen.springboot.entity.Address;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface AddressMapper extends BaseMapper<Address> {
    @Update("update address set status=1 where id=#{id}")
    boolean update1(Integer id);

    @Update("update address set status=0 ")
    void update0();

    @Select("select address from address where status=1 and user_id=#{userId}")
    String getOne(Integer userId);
}
